import axios from "@/util/axios.config";

export const getInfo = () => {
  return axios.get("/api/index/getInfo").then((res) => res.data);
};

export const getMineInfo = () => {
  return axios.get("/api/mine/getInfo").then((res) => res.data);
};

export const getMineExtend = () => {
  return axios.get("/api/mine/getExtendList").then((res) => res.data);
};

export const getWxPay = (sourceUserId: any) => {
  return axios
    .get("/api/pay", {
      params: {
        sourceUserId,
      },
    })
    .then((res) => res.data);
};

export const getWechatConfig = (url: any) => {
  return axios
    .get("/api/wechat/getWechatConfig", {
      params: {
        url,
      },
    })
    .then((res) => res.data);
};

export const getPoster = () => {
  return axios.get("/api/index/createPoster").then((res) => res.data);
};

export const addCount = () => {
  return axios.get("/api/index/addScanCount").then((res) => res.data);
};

export const addPhone = (params: any) => {
  return axios.post("/api/index/addPhone", params).then((res) => res.data);
};
